from Products.CMFCore import CMFCorePermissions
from AccessControl import getSecurityManager, ClassSecurityInfo
from Products.Archetypes.public import *
from Products.Archetypes.interfaces.orderedfolder import IOrderedFolder
from Products.ATContentTypes.atct import ATFolder, ATFolderSchema
from Products.GrupoVisao.config import *

schema  = ATFolderSchema.copy()

class folder_rh(ATFolder):
    """A frequently asked questions list."""
    schema                      = schema
    archetype_name = 'Pasta de banners da home'

    meta_type = 'folder_rh'
    portal_type = 'folder_rh'
    #content_icon                = "folder_rh.gif"
    filter_content_types        = True
    allowed_content_types       = ['curriculo']
    default_view                = "folder_rh_view"
    immediate_view              = "folder_rh_view"
    #suppl_views         = ( "folder_summary_view", "folder_tabular_view" )

    security            = ClassSecurityInfo()
    security.declarePublic("listFolderContents")

    actions =  (

       {'action': "string:${object_url}/folder_rh_view",
        'category': "object",
        'id': 'view',
        'name': 'View',
        'permissions': ("View",),
        'condition': 'python:1'
       },

       {'action': "string:${object_url}/curriculos_list",
        'category': "object",
        'id': 'list_curriculos',
        'name': 'Listar Curriculos',
        'permissions': ("Delete objects",),
        'condition': 'python:1'
       },

    )

registerType(folder_rh, PROJECTNAME)